<#include "/common/mobile.html" /> <@layout>
<head>

</head>

<script>
	function adds(obj, bs) {
		$("#type").attr("value", obj);
		var url = '';
		window.location.href = "${ctx}/weixin/savetypecy?type=" + obj
					+ "&fromuser=${(openid)!}";

	}
	
	/* function adds(obj, bs) {
		$("#type").attr("value", obj);
		var url = '';
		if (bs == "0") {
			url = "${ctx}/weixin/savetype/";
			$('#myform')
					.form(
							'submit',
							{
								url : url,
								onSubmit : function() {
								},
								success : function(data) {
									// 回填页面
									if (data == "0") {
										alert("选择失败！");
									} else {
										window.location.href = "${ctx}/wxContent/getTemp?id="
												+ data;
									}
									WeixinJSBridge.invoke('closeWindow', {},
											function(res) {
											});
								}
							});
		} else {
			window.location.href = "${ctx}/weixin/savetypecy?type=" + obj
					+ "&fromuser=${(openid)!}";
		}

	} */
</script>
<body>

	<div class="page-content">
		<div class="row-fluid">
			<div class="span12">
				<div class="center">
					<h2 class="header smaller lighter blue" style="color: #438EB9">模板选择</h2>
					<p><#if (mblist)??> <#list mblist as m> <#if (m.sj_lbid) =="0">
					
					<div class="accordion-group ">
						<div class="accordion-heading  ">
							<a href="#${(m.id)!}"
								style="background-color: #438EB9; color: white"
								data-toggle="collapse" class="accordion-toggle ">
								${(m.mbmc)!} </a>
						</div>
						<div class="accordion-body in  collapse" id="${(m.id)!}">
							<div class="accordion-inner">
								<#if (mblist)??> <#list mblist as s> <#if "${(m.id)!}" ==
								"${(s.sj_lbid)!}">

								<div class="widget-box">
									<div class="widget-header">
										<h5>${(s.mbmc)!}</h5>
									</div>
									<div class="widget-body  ">
										<div class="widget-main no-padding">
											<img src='${(s.picurl)!}'
												style='width: 200px; height: 250px;' />
										</div>
										<div class="widget-toolbox padding-8 clearfix">
											<a class="btn btn-mini btn-danger pull-right"
												onclick="adds('${(s.id)!}','${(s.mblx)!}')">
												选择此模板
											</a>
										</div>
									</div>
								</div>

								</#if> </#list> </#if>
							</div>
						</div>
					</div>
					</#if> </#list> </#if>


				</div>
			</div>
		</div>


		</br>
		<div>
			<a class="btn btn-primary  btn-block"
				href="http://mp.weixin.qq.com/s?__biz=MzAxODIwNDc2MQ==&mid=206519374&idx=1&sn=18a0b948284496ae7c691ca9298d9102&ptlang=2052&ADUIN=253154298&ADSESSION=1423820394&ADTAG=CLIENT.QQ.5389_.0&ADPUBNO=26441#rd">
				我也要制作
			</a>
		</div>
		<!-- /.span -->
	</div>


	<form class="form-inline" id="myform">
		<input type="hidden" name="type" id="type" value=""> <input
			type="hidden" name="fromuser" id="fromuser" value="${(openid)!}">
	</form>

</body>
<script>
	
</script>

</@layout>
